package com.fiveGroup.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fiveGroup.pojo.OrderInfo;
import com.fiveGroup.pojo.vo.BuyerOrderVo;
import com.fiveGroup.pojo.vo.OrderDetailVo;
import com.fiveGroup.pojo.vo.PayVo;
import com.fiveGroup.pojo.vo.SellerOrderVo;

import java.util.Date;
import java.util.List;

public interface OrderInfoService extends IService<OrderInfo> {
    /**
     * 获取买家订单列表
     */
    List<BuyerOrderVo> getBuyerOrders(Page<BuyerOrderVo> page, QueryWrapper<BuyerOrderVo> wrapper);

    /**
     * 获取卖家订单列表
     */
    List<SellerOrderVo> getSellerOrders(Page<SellerOrderVo> page, QueryWrapper<BuyerOrderVo> wrapper);

    /**
     * 支付订单
     */
    boolean payOrder(PayVo payVo);

    /**
     * 取消订单
     */
    boolean cancelOrder(OrderInfo orderInfo);

    OrderDetailVo getOrderDetail(Long orderId);

    // 在 OrderInfoService 中添加方法
    public int getOrderCountByDate(Date date);

}